1. Field of the Invention
The present invention generally relates to a recording medium playing apparatus for performing data writing/reading access to a recording medium having a plurality of sectors, and, more particularly, to an information data detecting apparatus for use in a recording medium playing apparatus, which prevents data overwriting at the time data is written on a recording medium.
2. Description of the Background Information
In an information recording/reproducing system, information is divided into certain units called blocks or sectors and information is recorded or reproduced unit by unit. For instance, data is recorded on a recording medium in a recording image as shown in FIG. 1.
Referring to FIG. 1, the sector address portion represents the physical address of a sector on the recording medium. The flag portion serves to indicate if this sector is a data-written sector, a defective or bad sector, or a data-erased sector. The user data portion is where user's information data is to be recorded. The buffer portion is provided to prevent the head of the sector address portion from being overwritten when data is recorded in the data portion even if some kind of physical change occurs on the recording medium.
In writing data on a recording medium, it is necessary to previously discriminate whether data has already been recorded on a sector in order to inhibit data overwriting.
Conventionally, as shown in FIG. 2, the flag portion in each sector of a recording medium is provided with a written flag (WRITTEN FLAG) that represents if data is written in this sector, so that the set/reset status of this flag is checked before data writing to prevent data overwriting. Alternatively, a target sector for data writing is traced before data writing to check if data is present in this sector using a hardware means for detecting the presence/absence of an information signal or by detecting a sync signal (block sync) in user data.
FIG. 3 presents a flowchart illustrating a sequence of steps for recording data in a sector by a method that detects if data is written in that sector by checking the presence or absence of the written flag.
First, a sector specified by a write command is searched by its sector address (step S31). Then, it is checked if the written flag is set in the sector searched in step S31 (step S32). When no written flag is set in step S32, that sector is judged to be a data-unwritten or unused sector, and data is written in the sector (step S33). When the written flag is found set in step S32, that sector is judged to be a data-written or used sector, and information to that effect is given to a host computer (step S34).
FIG. 4 presents a flowchart illustrating a sequence of steps to record data in a sector by a method of tracing the target sector before data writing and checking if data is present in this sector using a hardware-based information-signal detecting means.
First, a sector specified by a write command is traced to acquire an information signal (step S41). Then, it is checked if data is present in that sector from the acquired information signal (step S42). When no data is present in step S42, that sector is judged to be an unused sector, and data is written in the sector (step S43). When data is present in step S42, that sector is judged to be a used sector, and information to that effect is given to a host computer (step S44).
FIG. 5 presents a flowchart illustrating a sequence of steps to record data in a sector by a method of tracing the target sector before data writing and detecting a block sync to check if data is present in this sector.
First, a sector specified by a write command is traced to acquire an information signal (step S51). Then, the number of block syncs is checked from the acquired information signal (step S52). When the number of block syncs is less than a predetermined number, that sector is judged to be an unused sector, and data is written in the sector (step S53). When the number of block syncs is greater than the predetermined number, that sector is judged to be a used sector, and information to that effect is given to a host computer (step S54).
According to the first conventional method of detection if data is written in a sector by checking the presence or absence of the written flag, since no error check code is affixed to the written flag itself, the detection of the written flag is not sufficiently accurate. That is, if no written flag is set in an unused sector but the written flag is erroneously detected as present due to noise or the like, no error correction will be performed and no data will be written in that sector. Further, the recording capacity is inevitably reduced by the written flag.
According to the second conventional method of tracing the target sector before data writing and checking if data is present in this sector using a hardware-based information-signal detecting means, the information-signal detecting means should be realized by hardware, thus increasing the number of required circuit components. The hardware-based information-signal detecting means sends out a signal indicating the presence of data only when the information as shown in FIG. 6, which appears when a used sector is traced, reaches a predetermined threshold level. As the level of an information signal in the data portion is not uniform, however, it is difficult to determine the threshold level. What is more, data that has been recorded at a low level may not be detected for some reasons.
The third conventional method of tracing the target sector before data writing and detecting a block sync to check if data is present in this sector cannot be employed in a system such as the sampled servo system where a block sync is pre-formatted.